window.$config = {
    host:'',
    // host:'/server',
    rex:{
        tel : /^1[34578]\d{9}$/
    },
    iswx : function(){
        var ua = window.navigator.userAgent.toLowerCase();
        if(ua.match(/MicroMessenger/i) == 'micromessenger'){
            return true;
        }else{
            return false;
        }
    },
    wxShare : function() {
        var config = oe_wxconfig,
            title = "微信分享标题",
            summary = "描述",
            link = location.href,
            thumb = "http://h5.oeeee.com/h5/zmhhr/logo.jpg",
            content = {
                title: title,
                desc:summary,
                link: link,
                imgUrl:thumb,
                type: '',
                dataUrl: '',
                success: function () {},
                cancel: function () {}
            }

        wx.config({
            debug: false,
            appId: config.appId,
            timestamp: config.timestamp,
            nonceStr: config.nonceStr,
            signature: config.signature,
            jsApiList: [
                'onMenuShareAppMessage','onMenuShareTimeline','onMenuShareQQ','onMenuShareWeibo'
            ]
        });
        wx.checkJsApi({
            jsApiList: ['onMenuShareAppMessage','onMenuShareTimeline','onMenuShareQQ','onMenuShareWeibo'],
            success: function(res) {}
        });
        wx.ready(function () {
            wx.onMenuShareAppMessage(content);
            wx.onMenuShareTimeline(content);
            wx.onMenuShareQQ(content);
            wx.onMenuShareWeibo(content);
        });
    }
}